The present invention relates to an edge position detecting apparatus and method that optically detects an edge position of a target detection object using a reflective optical sensor for transmitting/receiving light, and a program that realizes a part of the functions of the apparatus by means of a computer.
There has been conventionally an image forming apparatus for forming an image on a recording paper via a recording head by moving a carriage provided with the recording head in a main scanning direction perpendicular to a conveying direction of the recording paper. For the image forming apparatus, there has been conventionally known an edge position detecting apparatus that optically detects both edges of the recording paper. In the edge position detecting apparatus, a reflective optical sensor, which is incorporated into the carriage, is moved with the carriage in the main scanning direction. When the reflective optical sensor is moved, the change in the level of a light-receiving signal obtained by the reflective optical sensor is detected, and thereby both edge positions of the recording paper are optically detected.
In such an edge position detecting apparatus, if the recording paper is soiled, the soil changes the signal level of the light-receiving signal obtained by the reflective optical sensor, and consequently the edge positions of the recording paper may be erroneously detected. Therefore, there has also been proposed an edge position detecting apparatus (for example, see Published Publication of Unexamined Japanese Patent Application No. 3-7371). In the apparatus, while the carriage is moved along the recording paper, the light amount of the reflected light received by the reflective optical sensor is detected. The position where the light amount is firstly increased and the position where the light amount is finally decreased are detected as both of the edge positions of the recording paper.